import { fromJS } from "immutable";
import * as mutations from '../mutations/filmMutation'
const initState = fromJS({
    films:[]
})
const reducer = (state=initState,{type,data}) =>{
    try {
        return mutations[type](state,data)
    } catch (error) {
        return state
    }
}
export default reducer 